package day5;
import java.io.*;
import java.util.Date;

/**
 * @author oldliu
 * @since 1.0
 */
public class FolderInfo {
    public static void main(String[] args) {

        File f=new File("D:\\Documents\\桌面\\76");
        System.out.println("存在? " +f.exists());
        System.out.println("大小："+f.length());
        System.out.println("是否是文件夹？"+f.isDirectory());
        System.out.println("是否是文件? "+f.isFile());

        System.out.println("能执行?"+f.canExecute());
        System.out.println("能读?"+f.canRead());
        System.out.println("能改？"+f.canWrite());
        System.out.println("最后的修改时间？"+new Date(f.lastModified()));

        File fr[]=f.listFiles();
        for(File s:fr){
            System.out.println(s);
        }
    }
}
